package org.jeecg.modules.zcgl.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.system.base.entity.DelFlagBaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description: 客户余额变动明细信息
 * @Author: jeecg-boot
 * @Date:   2020-12-11
 * @Version: V1.0
 */
@ApiModel(value="zcgl_customer_balance对象", description="客户余额信息")
@Data
@TableName("zcgl_customer_balance_changes_detail")
public class CustomerBalanceChangesDetail extends DelFlagBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
	/**客户信息*/
	@Excel(name = "客户信息", width = 15, dictTable = "zcgl_customer_info", dicText = "name", dicCode = "id")
	@ApiModelProperty(value = "客户信息")
	@NotBlank(message = "客户信息不能为空")
	private String customerId;
	/**客户余额信息*/
	@ApiModelProperty(value = "客户余额信息")
	private String customerBalanceId;
	/**应收款信息*/
	@Excel(name = "应收款信息", width = 15)
	@ApiModelProperty(value = "应收款信息")
	private String receivablesId;
	/**原始余额*/
	@Excel(name = "原始余额", width = 15)
	@ApiModelProperty(value = "原始余额")
	private BigDecimal oldBalance;
	/**变动类型：1、增加，2、减少*/
	@Excel(name = "变动类型", width = 15, dicCode = "zcgl_changes_type")
	@ApiModelProperty(value = "变动类型：1增加，2减少")
	@NotNull(message = "变动类型不能为空")
	private Integer changesType;
	/**操作类型：1、租金扣费，2、预存缴费，3、租金退回，4、手动调整，5、缴费退回，6、线下缴费剩余退回，7、线下缴费不够抵扣，8、退预存款*/
	@Excel(name = "操作类型", width = 15, dicCode = "zcgl_handle_type")
	@ApiModelProperty(value = "操作类型：1、租金扣费，2、预存缴费，3、租金退回，4、手动调整，5、缴费退回，6、线下缴费剩余退回，7、线下缴费不够抵扣，8、退预存款，9、预存余额抵扣缴费")
	private Integer handleType;
	/**操作对应数据ID：1、租金扣费（应收款项ID），2、预存缴费（预存缴费信息ID），3、租金退回（应收款项ID），4、手动调整(操作人员ID)，5、缴费退回（应收款项ID），6、线下缴费剩余退回（应收款项ID），7、线下缴费不够抵扣（应收款项ID，8、预存退款（应付款项ID）*/
//	@Excel(name = "操作对应数据", width = 15)
	@ApiModelProperty(value = "操作对应数据")
	private String handleId;
	/**变动金额*/
	@Excel(name = "变动金额", width = 15)
	@ApiModelProperty(value = "变动金额")
	@NotNull(message = "变动金额不能为空")
//	@Min(value = 0, message = "总金额（分）必须大于等于1")
	private BigDecimal changesAmount;
	/**变动后余额*/
	@Excel(name = "变动后余额", width = 15)
	@ApiModelProperty(value = "变动后余额")
	private BigDecimal newBalance;
	/**描述说明*/
	@Excel(name = "描述说明", width = 15)
	@ApiModelProperty(value = "描述说明")
	@NotEmpty(message = "变动描述说明不能为空")
	private String description;
}
